﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace lucky_dog_backend.Models
{
    public abstract class LuckyTableDTO
    {
        [JsonProperty("id")]
        public string Id { get; set; }
        [JsonProperty("title")]
        public string Title { get; set; }
        [JsonProperty("type")]
        public string Type { get; set; }
        [JsonProperty("dataCount")]
        public int DataCount { get; set; }
        protected LuckyTableDTO(string id, string title,string type)
        {
            Id = id;
            Title = title;
            Type = type;
        }
    }
    public class NumberLuckyTableDTO: LuckyTableDTO
    {
        [JsonProperty("number")]
        public int Number { get; set; }
        public NumberLuckyTableDTO(string id,string title,int number):base(id,title,"number")
        {            
            Number = number;
            DataCount = Number;
        }
    }
    public class StringLuckyTableDTO : LuckyTableDTO
    {
        [JsonProperty("string")]
        public List<string> String { get; set; }
        public StringLuckyTableDTO(string id, string title,List<string> stringList) : base(id, title, "string")
        {
            String = stringList;
            DataCount = stringList.Count;
        }
    }
}
